import axios from "axios";
 const request = axios.create({
    baseURL: 'http://127.0.0.1:3001/',
    timeout: 10000
})
request.interceptors.request.use(config=>{ //请求拦截
    const tokenkey = localStorage.getItem('cms_cookie')
    if(tokenkey){
        config.headers.authorization = tokenkey //请求头加上token
    }
    return config
})
export default request